Integrand size = 25, antiderivative size = 71 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=a^2 x-\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}+\frac {a^2 \cos (c+d x)}{d}-\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{d} \]
a^2*x-a^2*arctanh(cos(d*x+c))/d+a^2*cos(d*x+c)/d-1/3*a^2*cos(d*x+c)^3/d+a^ 2*cos(d*x+c)*sin(d*x+c)/d
Time = 5.42 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \left (9 \cos (c+d x)-\cos (3 (c+d x))+6 \left (2 \left (c+d x-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\sin (2 (c+d x))\right )\right )}{12 d} \]
(a^2*(9*Cos[c + d*x] - Cos[3*(c + d*x)] + 6*(2*(c + d*x - Log[Cos[(c + d*x )/2]] + Log[Sin[(c + d*x)/2]]) + Sin[2*(c + d*x)])))/(12*d)
Time = 0.32 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {3042, 3352, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos (c+d x) \cot (c+d x) (a \sin (c+d x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2 (a \sin (c+d x)+a)^2}{\sin (c+d x)}dx\) |
\(\Big \downarrow \) 3352 |
\(\displaystyle \int \left (2 a^2 \cos ^2(c+d x)+a^2 \sin (c+d x) \cos ^2(c+d x)+a^2 \cos (c+d x) \cot (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a^2 \text {arctanh}(\cos (c+d x))}{d}-\frac {a^2 \cos ^3(c+d x)}{3 d}+\frac {a^2 \cos (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{d}+a^2 x\) |
a^2*x - (a^2*ArcTanh[Cos[c + d*x]])/d + (a^2*Cos[c + d*x])/d - (a^2*Cos[c + d*x]^3)/(3*d) + (a^2*Cos[c + d*x]*Sin[c + d*x])/d
3.3.78.3.1 Defintions of rubi rules used
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig [(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Time = 0.18 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.80
method | result | size |
parallelrisch | \(\frac {a^{2} \left (12 d x +9 \cos \left (d x +c \right )+6 \sin \left (2 d x +2 c \right )-\cos \left (3 d x +3 c \right )+12 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8\right )}{12 d}\) | \(57\) |
derivativedivides | \(\frac {-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+2 a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
default | \(\frac {-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{3}+2 a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \left (\cos \left (d x +c \right )+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
risch | \(a^{2} x +\frac {3 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {3 a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a^{2} \cos \left (3 d x +3 c \right )}{12 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{2 d}\) | \(114\) |
norman | \(\frac {a^{2} x +a^{2} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{2}}{3 d}+\frac {2 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+3 a^{2} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 a^{2} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(154\) |
1/12*a^2*(12*d*x+9*cos(d*x+c)+6*sin(2*d*x+2*c)-cos(3*d*x+3*c)+12*ln(tan(1/ 2*d*x+1/2*c))+8)/d
Time = 0.28 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.21 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {2 \, a^{2} \cos \left (d x + c\right )^{3} - 6 \, a^{2} d x - 6 \, a^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 6 \, a^{2} \cos \left (d x + c\right ) + 3 \, a^{2} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, a^{2} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{6 \, d} \]
-1/6*(2*a^2*cos(d*x + c)^3 - 6*a^2*d*x - 6*a^2*cos(d*x + c)*sin(d*x + c) - 6*a^2*cos(d*x + c) + 3*a^2*log(1/2*cos(d*x + c) + 1/2) - 3*a^2*log(-1/2*c os(d*x + c) + 1/2))/d
\[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=a^{2} \left (\int \cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx + \int 2 \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(cos(c + d*x)**2*csc(c + d*x), x) + Integral(2*sin(c + d*x)* cos(c + d*x)**2*csc(c + d*x), x) + Integral(sin(c + d*x)**2*cos(c + d*x)** 2*csc(c + d*x), x))
Time = 0.21 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.06 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {2 \, a^{2} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 3 \, a^{2} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{6 \, d} \]
-1/6*(2*a^2*cos(d*x + c)^3 - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*a^2 - 3*a^ 2*(2*cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)))/d
Time = 0.32 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.42 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {3 \, {\left (d x + c\right )} a^{2} + 3 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \]
1/3*(3*(d*x + c)*a^2 + 3*a^2*log(abs(tan(1/2*d*x + 1/2*c))) - 2*(3*a^2*tan (1/2*d*x + 1/2*c)^5 - 6*a^2*tan(1/2*d*x + 1/2*c)^2 - 3*a^2*tan(1/2*d*x + 1 /2*c) - 2*a^2)/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 9.73 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.65 \[ \int \cos (c+d x) \cot (c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+4\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {4\,a^2}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {2\,a^2\,\mathrm {atan}\left (\frac {4\,a^4}{4\,a^4-4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^4-4\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
(a^2*log(tan(c/2 + (d*x)/2)))/d + (4*a^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan( c/2 + (d*x)/2)^5 + (4*a^2)/3 + 2*a^2*tan(c/2 + (d*x)/2))/(d*(3*tan(c/2 + ( d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 + 1)) + (2*a^2*a tan((4*a^4)/(4*a^4 - 4*a^4*tan(c/2 + (d*x)/2)) + (4*a^4*tan(c/2 + (d*x)/2) )/(4*a^4 - 4*a^4*tan(c/2 + (d*x)/2))))/d